import Home from "@/pages/Base/A009_Router/components/Home/index.js";
import About from "@/pages/Base/A009_Router/components/About.js";

import Message from "@/pages/Base/A009_Router/components/Home/components/Message.js";
import News from "@/pages/Base/A009_Router/components/Home/components/News.js";
import NewDetails from "@/pages/Base/A009_Router/components/Home/components/NewDetails.js";



import Base from "@/pages/Base/index.js";
import Interview from "@/pages/Interview/index.js";

import { Navigate } from "react-router-dom";
// import { element } from "prop-types";

let routes = [
  {
    path: "/base", // 基础页面
    element: <Base />,
    children: [
      {
        path: "home",
        element: <Home />,
        children: [
          {
            path: "message",
            element: <Message />,
          },
          {
            path: "news",
            element: <News />,
            children: [
              {
                // path: "details",
                path: "details/:id/:title/:content",
                element: <NewDetails />,
              },
            ],
          },
        ],
      },
      {
        path: "about",
        element: <About />,
      },
    ],
  },
  {
    path: "/interview",
    element: <Interview />, // 面试题
  },

  {
    path: "/",
    element: <Navigate to="/base" />,
  },
];
export default routes;
